﻿<%@ page contentType="text/html;charset=UTF-8" autoFlush="true"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/qautil.tld" prefix="qautil"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%request.setAttribute("curDate",new java.util.Date());%>
<table border="0" cellpadding="0" cellspacing="0" width="215" align="center" class="homepage-orangebackground">
    <tr>
        <td width="12px"></td>
        <td colspan="2" style="border-bottom-width:0px;"><img src="qa/images/light.gif" align="absbottom"/><html:link page="/question.mrqa?action=list&catId=18" styleClass="bar">公告栏</html:link></td>
    </tr>
    <tr>
        <td width="12px"></td>
        <td>
            <qautil:insert questionCategoryId="18" linksType="A"/>
        </td>
        <td width="9px"></td>
    </tr>
    <tr>
        <td colspan="2" align="right" style="border-bottom-width:0px;"><html:link page="/question.mrqa?action=list&catId=18">更多&nbsp;></html:link></td><td width="6px"></td>
    </tr>    
    <tr>
        <td colspan="3" style="height:2px;"></td>
    </tr>    
</table>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="215" align="center" class="homepage-orangebackground" border="1">
    <tr>
        <td width="12px">&nbsp;&nbsp;</td>
        <td colspan="2" style="border-bottom-width:0px;"><img src="qa/images/light.gif" align="absbottom"/><html:link page="/shoparticle.mrqa?action=exchangelist" styleClass="bar">积分换礼</html:link></td>
        <td width="9px"></td>
    </tr>
    <tr>
    	<td></td>
      <td>
<div id=demo1 style="OVERFLOW: hidden; WIDTH: 200px; align: center">
<table cellspacing="0" cellpadding="0" align="center" border="0">
    <tbody>
      <tr>
        <td id="articlePic1" valign="top">
<table width="<c:out value='${fn:length(articles)*114+fn:length(articles)*10+10}' />" height="80" border="0" cellpadding="0" cellspacing="0">
  <tr>
  	<c:forEach var="article" items="${articles}">
  	<td width="95" align="center">
    	<img src="<%=com.mr.qa.GlobalConfigs.ARTICLEIMAGE_DIR%><c:out value='${article.picture}' />" width="114" height="160" border="1" alt="<c:out value='${article.name}' />">
    </td>
  	</c:forEach>
  </tr>
</table>
</td>
        <td id="articlePic2" valign="top"></td>
      </tr>
    </tbody>
  </table>
</div>
<script>
				var speed=30;
				articlePic2.innerHTML=articlePic1.innerHTML 
				function Marquee(){
				if(demo1.scrollLeft>=articlePic1.scrollWidth){
					//alert("a");
					demo1.scrollLeft=0;
				}else{
					//alert("b");
					demo1.scrollLeft++;
				}}
				//alert(Marquee);
				MyMar=setInterval(Marquee,speed);
				demo1.onmouseover=function() {clearInterval(MyMar)};
				demo1.onmouseout=function() {MyMar=setInterval(Marquee,speed)};
</script>
</td>
<td width="9px"></td>
</tr>
<tr>
        <td colspan="2" align="right" style="border-bottom-width:0px;"><html:link page="/shoparticle.mrqa?action=exchangelist">详细内容&nbsp;></html:link></td><td width="6px"></td>
    </tr>  
</table>
<table border="0" width="215" cellpadding="0" cellspacing="0">
	<tr>
		<td><div style="padding-bottom:5px;padding-top:5px"><html:link page="/question.mrqa?action=view&id=1281"><img src="qa/images/activity/joinadmin.jpg" alt="网站管委会成员招募中"></html:link></div>
		</td>
	</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="215" align="center" class="homepage-questiontable">
    <tr>
        <td width="12px"></td>
        <td colspan="2" style="border-bottom-width:0px;">&nbsp;&nbsp;<html:link page="/question.mrqa?action=list" styleClass="bar">最新职场话题</html:link></td>
    </tr>
    <c:forEach var="question" items="${latestquestions}">
    <c:if test="${question.mrIaskCategory.state != '1'}">
    <tr>
        <td width="12px"></td>
        <td>
            <html:link page="/question.mrqa?action=view" paramId="id" paramName="question" paramProperty="id">
            	<c:if test="${question.titleAttribute != null}">
            		<span style="<c:out value="${question.titleAttribute}" />">
            	</c:if>
                <c:out value="${question.title}" escapeXml="false"/>
              <c:if test="${question.titleAttribute != null}">
            		</span>
            	</c:if>
            </html:link>
            <c:set var="differ" value="${(curDate.time-question.postDate.time)/3600000}"/>
            <c:if test="${differ <= 48}">
                <font color="#FF0000" title="48小时内新帖子">(new)</font>
            </c:if>
        </td>
        <td width="9px"></td>
    </tr>
    </c:if>
    </c:forEach>
    <tr>
        <td colspan="2" align="right" style="border-bottom-width:0px;"><html:link page="/question.mrqa?action=list">更多&nbsp;></html:link></td><td width="6px"></td>
    </tr>    
    <tr>
        <td colspan="3" style="height:2px;"></td>
    </tr>    
</table>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="215" align="center" class="homepage-questiontable">
    <tr>
        <td width="12px"></td>
        <td colspan="2" style="border-bottom-width:0px;">&nbsp;&nbsp;<html:link page="/life.mrqa?action=list" styleClass="bar">最新招聘信息</html:link></td>
    </tr>
    <c:forEach var="question" items="${latestlives}">
    <c:if test="${question.mrIaskCategory.state != '1'}">
    <tr>
        <td width="12px"></td>
        <td>
            <html:link page="/life.mrqa?action=view" paramId="id" paramName="question" paramProperty="id">
            	<c:if test="${question.titleAttribute != null}">
            		<span style="<c:out value="${question.titleAttribute}" />">
            	</c:if>
                <c:out value="${question.title}" escapeXml="false"/>
              <c:if test="${question.titleAttribute != null}">
            		</span>
            	</c:if>
            </html:link>
            <c:set var="differ" value="${(curDate.time-question.postDate.time)/3600000}"/>
            <c:if test="${differ <= 48}">
                <font color="#FF0000" title="48小时内新帖子">(new)</font>
            </c:if>
        </td>
        <td width="9px"></td>
    </tr>
    </c:if>
    </c:forEach>
    <tr>
        <td colspan="2" align="right" style="border-bottom-width:0px;"><html:link page="/life.mrqa?action=list">更多&nbsp;></html:link></td><td width="6px"></td>
    </tr>    
    <tr>
        <td colspan="3" style="height:2px;"></td>
    </tr>    
</table>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="215" align="center" class="homepage-news">
    <tr>
        <td width="12px"></td>
        <td style="border-bottom-width:0px;">&nbsp;&nbsp;<html:link page="/sf.mrqa?action=list" styleClass="bar">MFer 资料</html:link></td>
        <td width="9px"></td>
    </tr>
    <tr>
        <td colspan="3" style="height:5px;"></td>
    </tr>
    <c:forEach var="sharedfile" items="${sharedfiles}">
    <tr>
        <td width="12px"></td>
        <td>
            <html:link page="/sf.mrqa?action=view" paramId="id" paramName="sharedfile" paramProperty="id">
                <c:out value="${sharedfile.name}" escapeXml="false"/>
            </html:link>
            <c:set var="differ" value="${(curDate.time-sharedfile.postDate.time)/3600000}"/>
            <c:if test="${differ <= 48}">
                <font color="#FF0000" title="48小时内新资料">(new)</font>
            </c:if>
        </td>
        <td width="9px"></td>
    </tr>
    </c:forEach>
    <tr>
         <td width="12px"></td>
         <td style="border-bottom-width:0px;" align="right"><html:link page="/sf.mrqa?action=list">更多&nbsp;></html:link></td>
         <td width="9px"></td>
    </tr>
    </table>


